/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.ofbiz.eclipse.model.webapp.SiteConf.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.ofbiz.eclipse.model.webapp.SiteConf.AfterLoginType;
import org.ofbiz.eclipse.model.webapp.SiteConf.BeforeLogoutType;
import org.ofbiz.eclipse.model.webapp.SiteConf.DefaultRequestType;
import org.ofbiz.eclipse.model.webapp.SiteConf.FirstvisitType;
import org.ofbiz.eclipse.model.webapp.SiteConf.HandlerType;
import org.ofbiz.eclipse.model.webapp.SiteConf.IncludeType;
import org.ofbiz.eclipse.model.webapp.SiteConf.PostprocessorType;
import org.ofbiz.eclipse.model.webapp.SiteConf.PreprocessorType;
import org.ofbiz.eclipse.model.webapp.SiteConf.ProtectType;
import org.ofbiz.eclipse.model.webapp.SiteConf.RequestMapType;
import org.ofbiz.eclipse.model.webapp.SiteConf.SiteConfPackage;
import org.ofbiz.eclipse.model.webapp.SiteConf.SiteConfType;
import org.ofbiz.eclipse.model.webapp.SiteConf.ViewMapType;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Type</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getInclude <em>Include</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getDescription <em>Description</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getOwner <em>Owner</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getErrorpage <em>Errorpage</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getHandler <em>Handler</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getProtect <em>Protect</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getFirstvisit <em>Firstvisit</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getPreprocessor <em>Preprocessor</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getPostprocessor <em>Postprocessor</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getAfterLogin <em>After Login</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getBeforeLogout <em>Before Logout</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getDefaultRequest <em>Default Request</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getRequestMap <em>Request Map</em>}</li>
 *   <li>{@link org.ofbiz.eclipse.model.webapp.SiteConf.impl.SiteConfTypeImpl#getViewMap <em>View Map</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SiteConfTypeImpl extends EObjectImpl implements SiteConfType {
	/**
	 * The cached value of the '{@link #getInclude() <em>Include</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getInclude()
	 * @generated
	 * @ordered
	 */
	protected EList<IncludeType> include;

	/**
	 * The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDescription()
	 * @generated
	 * @ordered
	 */
	protected static final String DESCRIPTION_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDescription()
	 * @generated
	 * @ordered
	 */
	protected String description = DESCRIPTION_EDEFAULT;

	/**
	 * The default value of the '{@link #getOwner() <em>Owner</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOwner()
	 * @generated
	 * @ordered
	 */
	protected static final String OWNER_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getOwner() <em>Owner</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOwner()
	 * @generated
	 * @ordered
	 */
	protected String owner = OWNER_EDEFAULT;

	/**
	 * The default value of the '{@link #getErrorpage() <em>Errorpage</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getErrorpage()
	 * @generated
	 * @ordered
	 */
	protected static final String ERRORPAGE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getErrorpage() <em>Errorpage</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getErrorpage()
	 * @generated
	 * @ordered
	 */
	protected String errorpage = ERRORPAGE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getHandler() <em>Handler</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getHandler()
	 * @generated
	 * @ordered
	 */
	protected EList<HandlerType> handler;

	/**
	 * The cached value of the '{@link #getProtect() <em>Protect</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProtect()
	 * @generated
	 * @ordered
	 */
	protected ProtectType protect;

	/**
	 * The cached value of the '{@link #getFirstvisit() <em>Firstvisit</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFirstvisit()
	 * @generated
	 * @ordered
	 */
	protected FirstvisitType firstvisit;

	/**
	 * The cached value of the '{@link #getPreprocessor() <em>Preprocessor</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPreprocessor()
	 * @generated
	 * @ordered
	 */
	protected PreprocessorType preprocessor;

	/**
	 * The cached value of the '{@link #getPostprocessor() <em>Postprocessor</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getPostprocessor()
	 * @generated
	 * @ordered
	 */
	protected PostprocessorType postprocessor;

	/**
	 * The cached value of the '{@link #getAfterLogin() <em>After Login</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAfterLogin()
	 * @generated
	 * @ordered
	 */
	protected AfterLoginType afterLogin;

	/**
	 * The cached value of the '{@link #getBeforeLogout() <em>Before Logout</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBeforeLogout()
	 * @generated
	 * @ordered
	 */
	protected BeforeLogoutType beforeLogout;

	/**
	 * The cached value of the '{@link #getDefaultRequest() <em>Default Request</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDefaultRequest()
	 * @generated
	 * @ordered
	 */
	protected DefaultRequestType defaultRequest;

	/**
	 * The cached value of the '{@link #getRequestMap() <em>Request Map</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRequestMap()
	 * @generated
	 * @ordered
	 */
	protected EList<RequestMapType> requestMap;

	/**
	 * The cached value of the '{@link #getViewMap() <em>View Map</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getViewMap()
	 * @generated
	 * @ordered
	 */
	protected EList<ViewMapType> viewMap;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SiteConfTypeImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return SiteConfPackage.Literals.SITE_CONF_TYPE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<IncludeType> getInclude() {
		if (include == null) {
			include = new EObjectContainmentEList<IncludeType>(IncludeType.class, this, SiteConfPackage.SITE_CONF_TYPE__INCLUDE);
		}
		return include;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDescription(String newDescription) {
		String oldDescription = description;
		description = newDescription;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__DESCRIPTION, oldDescription, description));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getOwner() {
		return owner;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOwner(String newOwner) {
		String oldOwner = owner;
		owner = newOwner;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__OWNER, oldOwner, owner));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getErrorpage() {
		return errorpage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setErrorpage(String newErrorpage) {
		String oldErrorpage = errorpage;
		errorpage = newErrorpage;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__ERRORPAGE, oldErrorpage, errorpage));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<HandlerType> getHandler() {
		if (handler == null) {
			handler = new EObjectContainmentEList<HandlerType>(HandlerType.class, this, SiteConfPackage.SITE_CONF_TYPE__HANDLER);
		}
		return handler;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ProtectType getProtect() {
		return protect;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetProtect(ProtectType newProtect, NotificationChain msgs) {
		ProtectType oldProtect = protect;
		protect = newProtect;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__PROTECT, oldProtect, newProtect);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProtect(ProtectType newProtect) {
		if (newProtect != protect) {
			NotificationChain msgs = null;
			if (protect != null)
				msgs = ((InternalEObject)protect).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__PROTECT, null, msgs);
			if (newProtect != null)
				msgs = ((InternalEObject)newProtect).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__PROTECT, null, msgs);
			msgs = basicSetProtect(newProtect, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__PROTECT, newProtect, newProtect));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FirstvisitType getFirstvisit() {
		return firstvisit;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetFirstvisit(FirstvisitType newFirstvisit, NotificationChain msgs) {
		FirstvisitType oldFirstvisit = firstvisit;
		firstvisit = newFirstvisit;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT, oldFirstvisit, newFirstvisit);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setFirstvisit(FirstvisitType newFirstvisit) {
		if (newFirstvisit != firstvisit) {
			NotificationChain msgs = null;
			if (firstvisit != null)
				msgs = ((InternalEObject)firstvisit).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT, null, msgs);
			if (newFirstvisit != null)
				msgs = ((InternalEObject)newFirstvisit).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT, null, msgs);
			msgs = basicSetFirstvisit(newFirstvisit, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT, newFirstvisit, newFirstvisit));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PreprocessorType getPreprocessor() {
		return preprocessor;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetPreprocessor(PreprocessorType newPreprocessor, NotificationChain msgs) {
		PreprocessorType oldPreprocessor = preprocessor;
		preprocessor = newPreprocessor;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR, oldPreprocessor, newPreprocessor);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPreprocessor(PreprocessorType newPreprocessor) {
		if (newPreprocessor != preprocessor) {
			NotificationChain msgs = null;
			if (preprocessor != null)
				msgs = ((InternalEObject)preprocessor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR, null, msgs);
			if (newPreprocessor != null)
				msgs = ((InternalEObject)newPreprocessor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR, null, msgs);
			msgs = basicSetPreprocessor(newPreprocessor, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR, newPreprocessor, newPreprocessor));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PostprocessorType getPostprocessor() {
		return postprocessor;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetPostprocessor(PostprocessorType newPostprocessor, NotificationChain msgs) {
		PostprocessorType oldPostprocessor = postprocessor;
		postprocessor = newPostprocessor;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR, oldPostprocessor, newPostprocessor);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setPostprocessor(PostprocessorType newPostprocessor) {
		if (newPostprocessor != postprocessor) {
			NotificationChain msgs = null;
			if (postprocessor != null)
				msgs = ((InternalEObject)postprocessor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR, null, msgs);
			if (newPostprocessor != null)
				msgs = ((InternalEObject)newPostprocessor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR, null, msgs);
			msgs = basicSetPostprocessor(newPostprocessor, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR, newPostprocessor, newPostprocessor));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AfterLoginType getAfterLogin() {
		return afterLogin;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetAfterLogin(AfterLoginType newAfterLogin, NotificationChain msgs) {
		AfterLoginType oldAfterLogin = afterLogin;
		afterLogin = newAfterLogin;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN, oldAfterLogin, newAfterLogin);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAfterLogin(AfterLoginType newAfterLogin) {
		if (newAfterLogin != afterLogin) {
			NotificationChain msgs = null;
			if (afterLogin != null)
				msgs = ((InternalEObject)afterLogin).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN, null, msgs);
			if (newAfterLogin != null)
				msgs = ((InternalEObject)newAfterLogin).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN, null, msgs);
			msgs = basicSetAfterLogin(newAfterLogin, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN, newAfterLogin, newAfterLogin));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BeforeLogoutType getBeforeLogout() {
		return beforeLogout;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetBeforeLogout(BeforeLogoutType newBeforeLogout, NotificationChain msgs) {
		BeforeLogoutType oldBeforeLogout = beforeLogout;
		beforeLogout = newBeforeLogout;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT, oldBeforeLogout, newBeforeLogout);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setBeforeLogout(BeforeLogoutType newBeforeLogout) {
		if (newBeforeLogout != beforeLogout) {
			NotificationChain msgs = null;
			if (beforeLogout != null)
				msgs = ((InternalEObject)beforeLogout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT, null, msgs);
			if (newBeforeLogout != null)
				msgs = ((InternalEObject)newBeforeLogout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT, null, msgs);
			msgs = basicSetBeforeLogout(newBeforeLogout, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT, newBeforeLogout, newBeforeLogout));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DefaultRequestType getDefaultRequest() {
		return defaultRequest;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetDefaultRequest(DefaultRequestType newDefaultRequest, NotificationChain msgs) {
		DefaultRequestType oldDefaultRequest = defaultRequest;
		defaultRequest = newDefaultRequest;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST, oldDefaultRequest, newDefaultRequest);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setDefaultRequest(DefaultRequestType newDefaultRequest) {
		if (newDefaultRequest != defaultRequest) {
			NotificationChain msgs = null;
			if (defaultRequest != null)
				msgs = ((InternalEObject)defaultRequest).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST, null, msgs);
			if (newDefaultRequest != null)
				msgs = ((InternalEObject)newDefaultRequest).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST, null, msgs);
			msgs = basicSetDefaultRequest(newDefaultRequest, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST, newDefaultRequest, newDefaultRequest));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<RequestMapType> getRequestMap() {
		if (requestMap == null) {
			requestMap = new EObjectContainmentEList<RequestMapType>(RequestMapType.class, this, SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP);
		}
		return requestMap;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<ViewMapType> getViewMap() {
		if (viewMap == null) {
			viewMap = new EObjectContainmentEList<ViewMapType>(ViewMapType.class, this, SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP);
		}
		return viewMap;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case SiteConfPackage.SITE_CONF_TYPE__INCLUDE:
				return ((InternalEList<?>)getInclude()).basicRemove(otherEnd, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__HANDLER:
				return ((InternalEList<?>)getHandler()).basicRemove(otherEnd, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__PROTECT:
				return basicSetProtect(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT:
				return basicSetFirstvisit(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR:
				return basicSetPreprocessor(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR:
				return basicSetPostprocessor(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN:
				return basicSetAfterLogin(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT:
				return basicSetBeforeLogout(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST:
				return basicSetDefaultRequest(null, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP:
				return ((InternalEList<?>)getRequestMap()).basicRemove(otherEnd, msgs);
			case SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP:
				return ((InternalEList<?>)getViewMap()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case SiteConfPackage.SITE_CONF_TYPE__INCLUDE:
				return getInclude();
			case SiteConfPackage.SITE_CONF_TYPE__DESCRIPTION:
				return getDescription();
			case SiteConfPackage.SITE_CONF_TYPE__OWNER:
				return getOwner();
			case SiteConfPackage.SITE_CONF_TYPE__ERRORPAGE:
				return getErrorpage();
			case SiteConfPackage.SITE_CONF_TYPE__HANDLER:
				return getHandler();
			case SiteConfPackage.SITE_CONF_TYPE__PROTECT:
				return getProtect();
			case SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT:
				return getFirstvisit();
			case SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR:
				return getPreprocessor();
			case SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR:
				return getPostprocessor();
			case SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN:
				return getAfterLogin();
			case SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT:
				return getBeforeLogout();
			case SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST:
				return getDefaultRequest();
			case SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP:
				return getRequestMap();
			case SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP:
				return getViewMap();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case SiteConfPackage.SITE_CONF_TYPE__INCLUDE:
				getInclude().clear();
				getInclude().addAll((Collection<? extends IncludeType>)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__DESCRIPTION:
				setDescription((String)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__OWNER:
				setOwner((String)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__ERRORPAGE:
				setErrorpage((String)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__HANDLER:
				getHandler().clear();
				getHandler().addAll((Collection<? extends HandlerType>)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__PROTECT:
				setProtect((ProtectType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT:
				setFirstvisit((FirstvisitType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR:
				setPreprocessor((PreprocessorType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR:
				setPostprocessor((PostprocessorType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN:
				setAfterLogin((AfterLoginType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT:
				setBeforeLogout((BeforeLogoutType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST:
				setDefaultRequest((DefaultRequestType)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP:
				getRequestMap().clear();
				getRequestMap().addAll((Collection<? extends RequestMapType>)newValue);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP:
				getViewMap().clear();
				getViewMap().addAll((Collection<? extends ViewMapType>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case SiteConfPackage.SITE_CONF_TYPE__INCLUDE:
				getInclude().clear();
				return;
			case SiteConfPackage.SITE_CONF_TYPE__DESCRIPTION:
				setDescription(DESCRIPTION_EDEFAULT);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__OWNER:
				setOwner(OWNER_EDEFAULT);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__ERRORPAGE:
				setErrorpage(ERRORPAGE_EDEFAULT);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__HANDLER:
				getHandler().clear();
				return;
			case SiteConfPackage.SITE_CONF_TYPE__PROTECT:
				setProtect((ProtectType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT:
				setFirstvisit((FirstvisitType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR:
				setPreprocessor((PreprocessorType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR:
				setPostprocessor((PostprocessorType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN:
				setAfterLogin((AfterLoginType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT:
				setBeforeLogout((BeforeLogoutType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST:
				setDefaultRequest((DefaultRequestType)null);
				return;
			case SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP:
				getRequestMap().clear();
				return;
			case SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP:
				getViewMap().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case SiteConfPackage.SITE_CONF_TYPE__INCLUDE:
				return include != null && !include.isEmpty();
			case SiteConfPackage.SITE_CONF_TYPE__DESCRIPTION:
				return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
			case SiteConfPackage.SITE_CONF_TYPE__OWNER:
				return OWNER_EDEFAULT == null ? owner != null : !OWNER_EDEFAULT.equals(owner);
			case SiteConfPackage.SITE_CONF_TYPE__ERRORPAGE:
				return ERRORPAGE_EDEFAULT == null ? errorpage != null : !ERRORPAGE_EDEFAULT.equals(errorpage);
			case SiteConfPackage.SITE_CONF_TYPE__HANDLER:
				return handler != null && !handler.isEmpty();
			case SiteConfPackage.SITE_CONF_TYPE__PROTECT:
				return protect != null;
			case SiteConfPackage.SITE_CONF_TYPE__FIRSTVISIT:
				return firstvisit != null;
			case SiteConfPackage.SITE_CONF_TYPE__PREPROCESSOR:
				return preprocessor != null;
			case SiteConfPackage.SITE_CONF_TYPE__POSTPROCESSOR:
				return postprocessor != null;
			case SiteConfPackage.SITE_CONF_TYPE__AFTER_LOGIN:
				return afterLogin != null;
			case SiteConfPackage.SITE_CONF_TYPE__BEFORE_LOGOUT:
				return beforeLogout != null;
			case SiteConfPackage.SITE_CONF_TYPE__DEFAULT_REQUEST:
				return defaultRequest != null;
			case SiteConfPackage.SITE_CONF_TYPE__REQUEST_MAP:
				return requestMap != null && !requestMap.isEmpty();
			case SiteConfPackage.SITE_CONF_TYPE__VIEW_MAP:
				return viewMap != null && !viewMap.isEmpty();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (description: ");
		result.append(description);
		result.append(", owner: ");
		result.append(owner);
		result.append(", errorpage: ");
		result.append(errorpage);
		result.append(')');
		return result.toString();
	}

} //SiteConfTypeImpl
